package com.zhang.designmode.wangzheng_design_mode.prototype;

/**
 * @Author: zxz
 * @DateTime: 2022/3/7 14:41
 * @Description: TODO
 */
public class House implements Cloneable{
    private String address;

    public String getAddress() {
        return address;
    }

    public House setAddress(String address) {
        this.address = address;
        return this;
    }

    @Override
    public House clone() {
        try {
            House clone = (House) super.clone();
            // TODO: copy mutable state here, so the clone can't change the internals of the original
            return clone;
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}
